Consider a high availability environment where processes can be killed and restarted for various reasons, such as part of recovery of an abnormal termination. In such an environment, shared memory can be used to preserve state across restart events and share or exchange data between processes or threads. Shared memory can be mapped into each participating process' memory space. This allows arbitrary structures to be overlaid to this memory. When multiple threads access shared memory, concurrency issues may be encountered. One mechanism to handle such concurrency issues includes mutual exclusion mechanisms (e.g., semaphores and mutexes). Such mechanisms implement a critical or protected section of code where memory manipulation can occur while other processes or threads are blocked from accessing the memory being manipulated. If a process or thread restarts while executing a critical section, concurrency issues may arise.